<?php
/* @var $this ProductController */
/* @var $model Product */

$this->breadcrumbs=array(
	'Products'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List Product', 'url'=>array('index')),
	array('label'=>'Create Product', 'url'=>array('create')),
);
?>

<h1><?php echo Yii::t('app', 'Manage Products') ?></h1>

<?php
$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'product-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		array('name' => 'id', 'filter' => false, 'htmlOptions' => array('class' => 'center', 'style' => 'width:5%')),
		array(
			'name' => 'thumbnail',
			'type' => 'html',
			'filter' => false,	
			'value' => '( $data->thumbnail ) 
					? CHtml::image($data->thumbnail, "", array("style"=>"width:50px;height:50px;"))
					: "no image"',
			'htmlOptions' => array('style' => 'width:50px')
		),
		array(
			'name' => 'title', 
			'htmlOptions' => array('style' => 'width:20%')
		),
		array(
			'name' => 'productCategory.title', 
			'filter' => array(), 
			'htmlOptions' => array('style' => 'width:20%')
		),
		'quote',
		'status',
		'is_feature',
		array(
			'class'=>'CButtonColumn',
		)
	),
)); 
?>
